package com.homework;
@AutoRunClass
public class Student {
    private String name = "张三";
    private int age = 18;
    private char gender = '男';

    //无参构造
    public Student() {
    }
    //全参构造
    public Student(String name, int age, char gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }
    //get和set
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    //无参且公开的方法
    @AutoRunMethod
    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    //无参且公开的方法
    @AutoRunMethod
    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }

    //toString
    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                '}';
    }
}
